

<style type="text/css">
    #divIcon a{
        text-decoration: none; 
        color: green;
        font-size: 12px;

    }
    #divIcon a:hover {color: brown; font-size: 12px;}
    td{text-align: center; width: 50%;}
</style>
<?php

//---define condition for showing message --------

if ($this->session->userdata('sucessaddcard')) {
    echo $this->session->userdata('sucessaddcard');
    echo $this->session->unset_userdata('sucessaddcard');
} else if ($this->session->userdata('sucessadd')) {
    echo $this->session->userdata('sucessadd');
    echo $this->session->unset_userdata('sucessadd');
}
$admin = $this->session->userdata('user_type');
echo'<div id="divIcon">';
echo '<fieldset style="margin: 0 auto;width:60%;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">';
echo'<legend align="center" style="magin:auto;"><div  style="margin: 0 auto;width: 100%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;color:#5C9416;">Cards Management</div></legend>';
echo '<table class="mytable" width="50%" border="0" cellspacing="1" cellpadding="7" align="center">';
if ($admin == 1) {
    echo '<tr><td>' . anchor('card/manager', (img(array('alt' => '', 'src' => 'images/user_images/cardmanagement.png')))) . '<br />' . anchor('product/addcategory', 'Card Management') . '</td>';
    echo '<td>' . anchor('card/manager_add_type', img('images/user_images/cardtype.png')) . '<br />' . anchor('card/manager_add_type', 'Add Card Type') . '</td></tr>';
}else
    echo '<td>' . anchor('card/manager', (img(array('alt' => '', 'src' => 'images/user_images/cardmanagement.png')))) . '<br />' . anchor('product/addcategory', 'Card Management') . '</td></tr>';
echo '</table>';
echo '</fieldset>';
echo'</div>';
